<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>面向对象</title>
</head>
<body>
<script>
    //函数表达式
    function foo(){
        this.name="程麒阁"
        this.age=18
        return{
            name:this.name,
            age:this.age
        }
    }
    //这样面向对象
    var fo=new foo()
    console.log(fo)
</script>
</body>
</html>